#!/usr/bin/env python
# -*- coding: utf-8 -*-
from openerp import api, models


class ResPartner(models.Model):
    _inherit = 'res.partner'

    @api.model
    def set_test_email(self):
        users = self.env['res.users'].search([]).mapped('partner_id').ids
        partner = self.search([('id', 'not in', users)])
        partner.write({
            'email': 'test@example.com',
        })
        return True
